At present, many webpage games are developed by using a Canvas drawing tool based on HTML (i.e., HyperText Mark-up Language). In these games, a frame of a complete game screen is formed by using some basic images, such as characters, animals, background patterns and so on, and through further rendering, repetition, filling, and other drawing operations of a Canvas. In order to improve user experience of game players, a browser may use an OpenGL ES (OpenGL for Embedded Systems) technology to speed up drawing of the Canvas. OpenGL ES uploads the basic images used in the games to a GPU (i.e., Graphic Processing Unit) as textures, which are then used by the Canvas for drawing.
When the present methods use OpenGL ES for Canvas, each basic image corresponds to one url (Uniform Resource Locator). The browser finds an address where the image is stored according to the url and downloads image data. The image data may be in jpg, png, gif, webp, and other formats, and the browser needs to decode the image data to bitmap format data and uploads the bitmap format data obtained to the GPU as one texture. The GPU draws the texture onto the Canvas, and the Canvas completes a frame of a game screen by using textures of some basic images in combination with some subsequent drawing actions.
With the development of webpage games, the image resolution and number of the basic images in the webpage games become greater. When the browser decodes image data into bitmap format data, the amount of the bitmap format data obtained is greater such that, when GPU is used for speeding up Canvas drawing, a problem will arise. That is the slower speed at which the bitmap format data is uploaded to the GPU, thereby increasing the time for the GPU to upload the bitmap format data to the Canvas, which will thus reduce the Canvas drawing speed. Moreover, the memory space of the GPU is limited, and uploading of the bitmap format data to the GPU will occupy lots of the memory space of the GPU, leading to reduced operating speed of the GPU and smoothness of the game.
In addition, it is contemplated that with continuous development of wireless network and mobile terminal technologies, watching videos through mobile terminals has become many people's habits. At present, most users open an online video website through browsers of the mobile terminals, search for video resources that the users want to watch, and directly play the found video resources on the browser.
In order to prevent other websites from using their own video resources, many video websites will add a customized protocol header to a video playback address of a video resource, so as to encrypt and protect an actual video playback address of the video resource. When a browser is used to open such video websites, since the browser acquires a video playback address with a customized protocol header, the corresponding video resource cannot be found on a server of the video websites through the video playback address, such that the video resource cannot be played on the browser.
In order to allow users to watch video resources on such video websites, a video player released on such video websites needs to be installed onto the mobile terminal. The video player released on the video websites has a function of identifying the customized protocol header so that the actual video playback address can be obtained after the customized protocol header is identified. The video player may then find a corresponding video resource on the server of the video websites through the actual video playback address, and finally the find video resource to play.
Because the user cannot directly use a browser to play video resources of a video website, and it is often necessary to re-open the video player to play the video resources, the whole process of playing the video resources is very cumbersome, failing to meet the user's desire to directly watch videos or films on the browser, which affects the user's experience in watching video resources on the mobile terminal.